<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Arduino A2DP: src/BluetoothA2DPCommon.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Arduino A2DP
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">BluetoothA2DPCommon.h</div></div>
</div><!--header-->
<div class="contents">
<a href="_bluetooth_a2_d_p_common_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">// you may not use this file except in compliance with the License.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">// You may obtain a copy of the License at</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment">//     http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">// See the License for the specific language governing permissions and</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment">// limitations under the License.</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">//</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment">// Copyright 2020 Phil Schatzmann</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="comment">// Compile only for ESP32</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="preprocessor">#ifdef ARDUINO_ARCH_ESP32</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="preprocessor">#  include &quot;sdkconfig.h&quot;</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="preprocessor">#if defined(CONFIG_IDF_TARGET_ESP32) </span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="preprocessor">#  define IS_VALID_PLATFORM true</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="preprocessor">#  error &quot;Please read the ESP32-A2DP Wiki about the supported Platforms!&quot;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="preprocessor">#  define IS_VALID_PLATFORM false</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="comment">// Continue only for ESP32</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">#if IS_VALID_PLATFORM</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="preprocessor">#include &quot;config.h&quot;</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="comment">// If you use #include &quot;I2S.h&quot; the i2s functionality is hidden in a namespace</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span><span class="comment">// this hack prevents any error messages</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="preprocessor">#ifdef _I2S_H_INCLUDED</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="keyword">using namespace </span>esp_i2s;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span><span class="preprocessor">#include &lt;math.h&gt;</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span><span class="preprocessor">#include &lt;stdbool.h&gt;</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span><span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span><span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span><span class="preprocessor">#include &lt;stdlib.h&gt;</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span><span class="preprocessor">#include &lt;string.h&gt;</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span><span class="preprocessor">#include &lt;unistd.h&gt;</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span><span class="preprocessor">#include &quot;esp_idf_version.h&quot;</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span><span class="preprocessor">#include &quot;freertos/FreeRTOS.h&quot;</span>  <span class="comment">// needed for ESP Arduino &lt; 2.0</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="preprocessor">#include &quot;freertos/FreeRTOSConfig.h&quot;</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span><span class="preprocessor">#include &quot;freertos/queue.h&quot;</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span><span class="preprocessor">#include &quot;freertos/task.h&quot;</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span><span class="preprocessor">#include &quot;freertos/timers.h&quot;</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span><span class="preprocessor">#if ESP_IDF_VERSION &lt; ESP_IDF_VERSION_VAL(5, 2, 0)</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="preprocessor">#include &quot;freertos/xtensa_api.h&quot;</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span><span class="preprocessor">#include &quot;xtensa_api.h&quot;</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span><span class="preprocessor">#include &quot;A2DPVolumeControl.h&quot;</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="preprocessor">#include &quot;esp_a2dp_api.h&quot;</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span><span class="preprocessor">#include &quot;esp_avrc_api.h&quot;</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span><span class="preprocessor">#include &quot;esp_bt.h&quot;</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="preprocessor">#include &quot;esp_bt_device.h&quot;</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span><span class="preprocessor">#include &quot;esp_bt_main.h&quot;</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span><span class="preprocessor">#include &quot;esp_gap_bt_api.h&quot;</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span><span class="preprocessor">#include &quot;esp_spp_api.h&quot;</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span><span class="preprocessor">#include &quot;esp_task_wdt.h&quot;</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span><span class="preprocessor">#include &quot;esp_timer.h&quot;</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span><span class="preprocessor">#include &quot;nvs.h&quot;</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span><span class="preprocessor">#include &quot;nvs_flash.h&quot;</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span><span class="preprocessor">#ifdef ARDUINO_ARCH_ESP32</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span><span class="preprocessor">#include &quot;esp32-hal-bt.h&quot;</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span><span class="preprocessor">#include &quot;esp32-hal-log.h&quot;</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span><span class="preprocessor">#include &quot;esp_log.h&quot;</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span><span class="preprocessor">#if !defined(ESP_IDF_VERSION)</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="preprocessor">#error Unsupported ESP32 Version: Upgrade the ESP32 version in the Board Manager</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span><span class="comment">// Support for old and new IDF version</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span><span class="preprocessor">#if ESP_IDF_VERSION &lt; ESP_IDF_VERSION_VAL(4, 0, 0) &amp;&amp; \</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span><span class="preprocessor">    !defined(I2S_COMM_FORMAT_STAND_I2S)</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span><span class="comment">// support for old idf releases</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span><span class="preprocessor">#define I2S_COMM_FORMAT_STAND_I2S \</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span><span class="preprocessor">  (I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB)</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span><span class="preprocessor">#define I2S_COMM_FORMAT_STAND_MSB \</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span><span class="preprocessor">  (I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_LSB)</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span><span class="preprocessor">#define I2S_COMM_FORMAT_STAND_PCM_LONG \</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span><span class="preprocessor">  (I2S_COMM_FORMAT_PCM | I2S_COMM_FORMAT_PCM_LONG)</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span><span class="preprocessor">#define I2S_COMM_FORMAT_STAND_PCM_SHORT \</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span><span class="preprocessor">  (I2S_COMM_FORMAT_PCM | I2S_COMM_FORMAT_PCM_SHORT)</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span><span class="comment">// Prior IDF 5 support</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span><span class="preprocessor">#if ESP_IDF_VERSION &lt; ESP_IDF_VERSION_VAL(5, 0, 0)</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span><span class="preprocessor">#define TaskHandle_t xTaskHandle</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span><span class="preprocessor">#define QueueHandle_t xQueueHandle</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span><span class="preprocessor">#define TickType_t portTickType</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span> </div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span><span class="preprocessor">#if ESP_IDF_VERSION &lt; ESP_IDF_VERSION_VAL(5, 3, 0)</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span><span class="preprocessor">#define esp_bt_gap_set_device_name esp_bt_dev_set_device_name</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span><span class="preprocessor">#define A2DP_DEPRECATED __attribute__((deprecated))</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span> </div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span><span class="preprocessor">#define BT_APP_SIG_WORK_DISPATCH (0x01)</span></div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span> </div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"><a class="line" href="_bluetooth_a2_d_p_common_8h.html#a9bee258e477be3c0e70d6029ed86a019">  124</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="_bluetooth_a2_d_p_common_8h.html#a9bee258e477be3c0e70d6029ed86a019">app_callback_t</a>)(uint16_t event, <span class="keywordtype">void</span> *param);</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span> </div>
<div class="foldopen" id="foldopen00128" data-start="{" data-end="};">
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"><a class="line" href="structbt__app__msg__t.html">  128</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"><a class="line" href="structbt__app__msg__t.html#a3d8f18211a5ce29fecbebc5546e7a17e">  129</a></span>  uint16_t <a class="code hl_variable" href="structbt__app__msg__t.html#a3d8f18211a5ce29fecbebc5546e7a17e">sig</a>;      </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"><a class="line" href="structbt__app__msg__t.html#a74f4561abb15d9ae98c3eefdd68de7c4">  130</a></span>  uint16_t <a class="code hl_variable" href="structbt__app__msg__t.html#a74f4561abb15d9ae98c3eefdd68de7c4">event</a>;    </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"><a class="line" href="structbt__app__msg__t.html#a64ce3190ec86ce6a75f6b421319ed8f7">  131</a></span>  <a class="code hl_typedef" href="_bluetooth_a2_d_p_common_8h.html#a9bee258e477be3c0e70d6029ed86a019">app_callback_t</a> <a class="code hl_variable" href="structbt__app__msg__t.html#a64ce3190ec86ce6a75f6b421319ed8f7">cb</a>; </div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"><a class="line" href="structbt__app__msg__t.html#aae06d9a8a215b9ae4b5a3827f5e5e7a7">  132</a></span>  <span class="keywordtype">void</span> *<a class="code hl_variable" href="structbt__app__msg__t.html#aae06d9a8a215b9ae4b5a3827f5e5e7a7">param</a>;       </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>} <a class="code hl_struct" href="structbt__app__msg__t.html">bt_app_msg_t</a>;</div>
</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span><span class="preprocessor">#define BT_AV_TAG &quot;BT_AV&quot;</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span><span class="preprocessor">#define BT_RC_CT_TAG &quot;RCCT&quot;</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span><span class="preprocessor">#define BT_APP_TAG &quot;BT_API&quot;</span></div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span><span class="comment">// AVRCP used transaction labels </span></div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span><span class="preprocessor">#define APP_RC_CT_TL_GET_CAPS (0)</span></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span><span class="preprocessor">#define APP_RC_CT_TL_GET_META_DATA (1)</span></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span><span class="preprocessor">#define APP_RC_CT_TL_RN_TRACK_CHANGE (2)</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span><span class="preprocessor">#define APP_RC_CT_TL_RN_PLAYBACK_CHANGE (3)</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span><span class="preprocessor">#define APP_RC_CT_TL_RN_PLAY_POS_CHANGE (4)</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span><span class="comment">// common a2dp callbacks</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> <span class="keywordtype">void</span> ccall_bt_app_task_handler(<span class="keywordtype">void</span> *arg);</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> <span class="keywordtype">void</span> ccall_app_gap_callback(esp_bt_gap_cb_event_t event,</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>                                       esp_bt_gap_cb_param_t *param);</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> <span class="keywordtype">void</span> ccall_app_rc_ct_callback(esp_avrc_ct_cb_event_t event,</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>                                         esp_avrc_ct_cb_param_t *param);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> <span class="keywordtype">void</span> ccall_app_a2d_callback(esp_a2d_cb_event_t event,</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span>                                       esp_a2d_cb_param_t *param);</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> <span class="keywordtype">void</span> ccall_av_hdl_stack_evt(uint16_t event, <span class="keywordtype">void</span> *p_param);</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span> </div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span><span class="preprocessor">#if ESP_IDF_VERSION &gt;= ESP_IDF_VERSION_VAL(4, 0, 0)</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> <span class="keywordtype">void</span> ccall_app_rc_tg_callback(esp_avrc_tg_cb_event_t event,</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>                                         esp_avrc_tg_cb_param_t *param);</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> <span class="keywordtype">void</span> ccall_av_hdl_avrc_tg_evt(uint16_t event, <span class="keywordtype">void</span> *p_param);</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span> </div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="group__a2dp.html#ga28a6ac1cbaf47c9d341da5391e2e72b3">  166</a></span><span class="keyword">enum</span> <a class="code hl_enumeration" href="group__a2dp.html#ga28a6ac1cbaf47c9d341da5391e2e72b3">ReconnectStatus</a> { NoReconnect, AutoReconnect, IsReconnecting };</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span> </div>
<div class="foldopen" id="foldopen00173" data-start="{" data-end="};">
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html">  173</a></span><span class="keyword">class </span><a class="code hl_class" href="class_bluetooth_a2_d_p_common.html">BluetoothA2DPCommon</a> {</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span>  <span class="keyword">friend</span> <span class="keywordtype">void</span> <a class="code hl_friend" href="class_bluetooth_a2_d_p_common.html#a6c7e4fb41d19a7d79bce115bd1502649">ccall_bt_app_task_handler</a>(<span class="keywordtype">void</span> *arg);</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>  <span class="keyword">friend</span> <span class="keywordtype">void</span> ccall_app_gap_callback(esp_bt_gap_cb_event_t event,</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>                                     esp_bt_gap_cb_param_t *param);</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>  <span class="keyword">friend</span> <span class="keywordtype">void</span> ccall_app_rc_ct_callback(esp_avrc_ct_cb_event_t event,</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span>                                       esp_avrc_ct_cb_param_t *param);</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span>  <span class="keyword">friend</span> <span class="keywordtype">void</span> ccall_app_a2d_callback(esp_a2d_cb_event_t event,</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span>                                     esp_a2d_cb_param_t *param);</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span>  <span class="keyword">friend</span> <span class="keywordtype">void</span> ccall_av_hdl_stack_evt(uint16_t event, <span class="keywordtype">void</span> *p_param);</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span> </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span><span class="preprocessor">#if ESP_IDF_VERSION &gt;= ESP_IDF_VERSION_VAL(4, 0, 0)</span></div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span>  <span class="keyword">friend</span> <span class="keywordtype">void</span> <a class="code hl_friend" href="class_bluetooth_a2_d_p_common.html#ac82ed712dca89857181a7d1835cced7c">ccall_app_rc_tg_callback</a>(esp_avrc_tg_cb_event_t event,</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span>                                       esp_avrc_tg_cb_param_t *param);</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span>  <span class="comment">/* avrc TG event handler */</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span>  <span class="keyword">friend</span> <span class="keywordtype">void</span> ccall_av_hdl_avrc_tg_evt(uint16_t event, <span class="keywordtype">void</span> *p_param);</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span> </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span>  <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a7cbfe59ac018d6886622c24139742ebe">BluetoothA2DPCommon</a>();</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a4bbbd1a2c9c85004afaa7c6dbad45322">  196</a></span>  <span class="keyword">virtual</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a4bbbd1a2c9c85004afaa7c6dbad45322">~BluetoothA2DPCommon</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span> </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a537d576b12d1158eb0681a6195b258de">set_auto_reconnect</a>(<span class="keywordtype">bool</span> active);</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span> </div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#ab63e627832d6377be32dd700130bf0d8">disconnect</a>();</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span> </div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#ac795a023f85438355a1b00644f2b040f">reconnect</a>();</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span> </div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a788d81fe538021f912d737de72ed6be6">connect_to</a>(<a class="code hl_typedef" href="group__a2dp.html#gae1f72542f04666cd97c26732366bf109">esp_bd_addr_t</a> peer);</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a0a8a860a325348cdf210637e8d1159e6">set_connected</a>(<span class="keywordtype">bool</span> active);</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span> </div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a76e329bf0587ebf41792871acc69188b">end</a>(<span class="keywordtype">bool</span> releaseMemory = <span class="keyword">false</span>);</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span> </div>
<div class="foldopen" id="foldopen00218" data-start="{" data-end="}">
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a5e76412770515732e3f54275decf02f0">  218</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a5e76412770515732e3f54275decf02f0">is_connected</a>() {</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>    <span class="keywordflow">return</span> connection_state == <a class="code hl_enumvalue" href="group__a2dp.html#gga52caa2d1e1c9d880c9651d52ff78a590a0248c5f6ba7c85f2044a9a2c79bc57d4">ESP_A2D_CONNECTION_STATE_CONNECTED</a>;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>  }</div>
</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span> </div>
<div class="foldopen" id="foldopen00223" data-start="{" data-end="}">
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a0bab92d9317837ecaeacbfe26814e28c">  223</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a0bab92d9317837ecaeacbfe26814e28c">set_volume</a>(uint8_t volume) {</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno">  224</span>    volume_value = std::min((<span class="keywordtype">int</span>)volume, 0x7F);</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno">  225</span>    ESP_LOGI(BT_AV_TAG, <span class="stringliteral">&quot;set_volume: %d&quot;</span>, volume_value);</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno">  226</span>    <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a8f1619be2457a0a9e359ff4fefe1dbf6">volume_control</a>()-&gt;<a class="code hl_function" href="class_a2_d_p_volume_control.html#a4a40e553f8c15a2cecb6f2f71fa0464c">set_volume</a>(volume_value);</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span>    <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a8f1619be2457a0a9e359ff4fefe1dbf6">volume_control</a>()-&gt;<a class="code hl_function" href="class_a2_d_p_volume_control.html#abdb9256f6a30b6c716193af7fadeee9c">set_enabled</a>(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span>    is_volume_used = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span>  }</div>
</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span> </div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a0e570c2c2f9db40873286e0571f0d93a">  232</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a0e570c2c2f9db40873286e0571f0d93a">get_volume</a>() { <span class="keywordflow">return</span> is_volume_used ? volume_value : 0; }</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno">  233</span> </div>
<div class="foldopen" id="foldopen00235" data-start="{" data-end="}">
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a7757ddbf424aeb909dc952d7c40fc241">  235</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a7757ddbf424aeb909dc952d7c40fc241">set_volume_control</a>(<a class="code hl_class" href="class_a2_d_p_volume_control.html">A2DPVolumeControl</a> *ptr) {</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span>    volume_control_ptr = ptr;</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>  }</div>
</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span> </div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno">  240</span>  <span class="keyword">virtual</span> <a class="code hl_enumeration" href="group__a2dp.html#ga49adfa87b1ad7420b0075a0ac03cc194">esp_a2d_audio_state_t</a> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a74eadbd69b5c7adf1b190c7e41b75b10">get_audio_state</a>();</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span> </div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno">  243</span>  <span class="keyword">virtual</span> <a class="code hl_enumeration" href="group__a2dp.html#ga52caa2d1e1c9d880c9651d52ff78a590">esp_a2d_connection_state_t</a> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a513b32676d8fc248bb481180f832ef97">get_connection_state</a>();</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span> </div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno">  247</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#aa79cff78c075c9273ea2b5c03f052fcd">set_on_connection_state_changed</a>(</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno">  248</span>      <span class="keywordtype">void</span> (*callBack)(<a class="code hl_enumeration" href="group__a2dp.html#ga52caa2d1e1c9d880c9651d52ff78a590">esp_a2d_connection_state_t</a> state, <span class="keywordtype">void</span> *),</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno">  249</span>      <span class="keywordtype">void</span> *obj = <span class="keyword">nullptr</span>);</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span> </div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a169e9b94cbbfb7311a8722cc6d436e95">set_on_audio_state_changed_post</a>(</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno">  254</span>      <span class="keywordtype">void</span> (*callBack)(<a class="code hl_enumeration" href="group__a2dp.html#ga49adfa87b1ad7420b0075a0ac03cc194">esp_a2d_audio_state_t</a> state, <span class="keywordtype">void</span> *),</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span>      <span class="keywordtype">void</span> *obj = <span class="keyword">nullptr</span>);</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span> </div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno">  258</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a5f13ecf541393c21a5a489235bad27fb">set_on_audio_state_changed</a>(</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno">  259</span>      <span class="keywordtype">void</span> (*callBack)(<a class="code hl_enumeration" href="group__a2dp.html#ga49adfa87b1ad7420b0075a0ac03cc194">esp_a2d_audio_state_t</a> state, <span class="keywordtype">void</span> *),</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno">  260</span>      <span class="keywordtype">void</span> *obj = <span class="keyword">nullptr</span>);</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span> </div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno">  264</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#aa6601d3c57e37f77bfdd03a3ef6231e2">debounce</a>(<span class="keywordtype">void</span> (*cb)(<span class="keywordtype">void</span>), <span class="keywordtype">int</span> ms);</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno">  265</span> </div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno">  267</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a791432e5c800e75fb11b858071cff651">log_free_heap</a>();</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span> </div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno">  270</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a2b78346084e12feeea035d006e7cf07a">to_str</a>(<a class="code hl_enumeration" href="group__a2dp.html#ga52caa2d1e1c9d880c9651d52ff78a590">esp_a2d_connection_state_t</a> state);</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno">  271</span> </div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno">  273</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a2b78346084e12feeea035d006e7cf07a">to_str</a>(<a class="code hl_enumeration" href="group__a2dp.html#ga49adfa87b1ad7420b0075a0ac03cc194">esp_a2d_audio_state_t</a> state);</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno">  274</span> </div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno">  276</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a2b78346084e12feeea035d006e7cf07a">to_str</a>(<a class="code hl_typedef" href="group__a2dp.html#gae1f72542f04666cd97c26732366bf109">esp_bd_addr_t</a> bda);</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno">  277</span> </div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno">  279</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a2b78346084e12feeea035d006e7cf07a">to_str</a>(esp_bt_gap_discovery_state_t state);</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno">  280</span> </div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno">  281</span><span class="preprocessor">#if ESP_IDF_VERSION &gt;= ESP_IDF_VERSION_VAL(4, 0, 0)</span></div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno">  283</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a2b78346084e12feeea035d006e7cf07a">to_str</a>(<a class="code hl_enumeration" href="group__a2dp.html#ga89fdf5fb26b1ea6f33d36cc0eebca4fb">esp_avrc_playback_stat_t</a> state);</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span> </div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a68f9e168839f0faeb72705ccabbb6b7a">  287</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a68f9e168839f0faeb72705ccabbb6b7a">set_task_priority</a>(UBaseType_t priority) { task_priority = priority; }</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno">  288</span> </div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a694940fad2a2d498875cfbdf52eea58b">  291</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a694940fad2a2d498875cfbdf52eea58b">set_task_core</a>(BaseType_t core) { task_core = core; }</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno">  292</span> </div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#ae5e96c34428c50873a0ca7423a6b5402">  294</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#ae5e96c34428c50873a0ca7423a6b5402">set_event_queue_size</a>(<span class="keywordtype">int</span> size) { event_queue_size = size; }</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno">  295</span> </div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a04bc52a4279a503203084492fe20c32e">  297</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a04bc52a4279a503203084492fe20c32e">set_event_stack_size</a>(<span class="keywordtype">int</span> size) { event_stack_size = size; }</div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno">  298</span> </div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#acf924bb9f5e348c85e65879c337a4bde">  300</a></span>  <span class="keyword">virtual</span> <a class="code hl_typedef" href="group__a2dp.html#gae1f72542f04666cd97c26732366bf109">esp_bd_addr_t</a> *<a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#acf924bb9f5e348c85e65879c337a4bde">get_last_peer_address</a>() { <span class="keywordflow">return</span> &amp;last_connection; }</div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno">  301</span> </div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno">  302</span><span class="preprocessor">#if ESP_IDF_VERSION &gt;= ESP_IDF_VERSION_VAL(4, 0, 0)</span></div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno">  304</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a8e53adc58f665113c9ac6a5521e58814">set_discoverability</a>(<a class="code hl_enumeration" href="group__a2dp.html#ga6562796046744d7333ad2c64d2c8557d">esp_bt_discovery_mode_t</a> d);</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno">  305</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno">  306</span> </div>
<div class="foldopen" id="foldopen00308" data-start="{" data-end="}">
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a8b37f48a6b0bca33fb21b2a9ae9dab7c">  308</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a8b37f48a6b0bca33fb21b2a9ae9dab7c">set_connectable</a>(<span class="keywordtype">bool</span> connectable) {</div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno">  309</span>    <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#af1e2f14ddbe9266b61f5e721095c3685">set_scan_mode_connectable</a>(connectable);</div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno">  310</span>  }</div>
</div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno">  311</span> </div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a458bca4d65937c5e2de7bfeb0f454d88">  313</a></span>  <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a458bca4d65937c5e2de7bfeb0f454d88">get_name</a>() { <span class="keywordflow">return</span> bt_name; }</div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno">  314</span> </div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno">  316</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a962cc9aef396b06c7eb6f56462a743ac">clean_last_connection</a>();</div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno">  317</span> </div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a41ab8453d4f7f88d68d6cdb1a866532b">  320</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a41ab8453d4f7f88d68d6cdb1a866532b">set_default_bt_mode</a>(<a class="code hl_enumeration" href="group__a2dp.html#ga9861ef3ac455a4b2875219d457073de4">esp_bt_mode_t</a> mode) { bt_mode = mode; }</div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno">  321</span> </div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno">  322</span><span class="preprocessor">#if ESP_IDF_VERSION &gt;= ESP_IDF_VERSION_VAL(5, 2, 1)</span></div>
<div class="foldopen" id="foldopen00324" data-start="{" data-end="}">
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a145c20271b53d4329e0e2c7fa36692b0">  324</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a145c20271b53d4329e0e2c7fa36692b0">set_bluedroid_config_t</a>(esp_bluedroid_config_t cfg) {</div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno">  325</span>    bluedroid_config = cfg;</div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno">  326</span>  }</div>
</div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno">  327</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno">  329</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a2302fff324e703c3906835f759e87307">delay_ms</a>(uint32_t millis);</div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno">  331</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a688bfd727bfed94f255b63c16a6b1b3c">get_millis</a>();</div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno">  332</span> </div>
<div class="foldopen" id="foldopen00341" data-start="{" data-end="}">
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a17013c6f40042c68821548cab9ddb5eb">  341</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a17013c6f40042c68821548cab9ddb5eb">set_avrc_rn_events</a>(std::vector&lt;esp_avrc_rn_event_ids_t&gt; events) {</div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno">  342</span>    avrc_rn_events = events;</div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno">  343</span>  }</div>
</div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno">  344</span> </div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno">  345</span> <span class="keyword">protected</span>:</div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno">  346</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *bt_name = {0};</div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno">  347</span>  <a class="code hl_typedef" href="group__a2dp.html#gae1f72542f04666cd97c26732366bf109">esp_bd_addr_t</a> peer_bd_addr;</div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno">  348</span>  <a class="code hl_enumeration" href="group__a2dp.html#ga28a6ac1cbaf47c9d341da5391e2e72b3">ReconnectStatus</a> reconnect_status = NoReconnect;</div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno">  349</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> reconnect_timout = 0;</div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno">  350</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> default_reconnect_timout = 10000;</div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno">  351</span>  <span class="keywordtype">bool</span> is_autoreconnect_allowed = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno">  352</span>  uint32_t debounce_ms = 0;</div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno">  353</span>  <a class="code hl_class" href="class_a2_d_p_default_volume_control.html">A2DPDefaultVolumeControl</a> default_volume_control;</div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno">  354</span>  <a class="code hl_class" href="class_a2_d_p_volume_control.html">A2DPVolumeControl</a> *volume_control_ptr = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno">  355</span>  <a class="code hl_typedef" href="group__a2dp.html#gae1f72542f04666cd97c26732366bf109">esp_bd_addr_t</a> last_connection = {0, 0, 0, 0, 0, 0};</div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno">  356</span>  <span class="keywordtype">bool</span> is_start_disabled = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno">  357</span>  <span class="keywordtype">bool</span> is_target_status_active = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno">  358</span>  void (*connection_state_callback)(<a class="code hl_enumeration" href="group__a2dp.html#ga52caa2d1e1c9d880c9651d52ff78a590">esp_a2d_connection_state_t</a> state,</div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno">  359</span>                                    <span class="keywordtype">void</span> *obj) = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno">  360</span>  void (*audio_state_callback)(<a class="code hl_enumeration" href="group__a2dp.html#ga49adfa87b1ad7420b0075a0ac03cc194">esp_a2d_audio_state_t</a> state,</div>
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno">  361</span>                               <span class="keywordtype">void</span> *obj) = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno">  362</span>  void (*audio_state_callback_post)(<a class="code hl_enumeration" href="group__a2dp.html#ga49adfa87b1ad7420b0075a0ac03cc194">esp_a2d_audio_state_t</a> state,</div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno">  363</span>                                    <span class="keywordtype">void</span> *obj) = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno">  364</span>  <span class="keywordtype">void</span> *connection_state_obj = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno">  365</span>  <span class="keywordtype">void</span> *audio_state_obj = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno">  366</span>  <span class="keywordtype">void</span> *audio_state_obj_post = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno">  367</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *m_a2d_conn_state_str[4] = {<span class="stringliteral">&quot;Disconnected&quot;</span>, <span class="stringliteral">&quot;Connecting&quot;</span>,</div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno">  368</span>                                         <span class="stringliteral">&quot;Connected&quot;</span>, <span class="stringliteral">&quot;Disconnecting&quot;</span>};</div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno">  369</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *m_a2d_audio_state_str[4] = {<span class="stringliteral">&quot;Suspended&quot;</span>, <span class="stringliteral">&quot;Started&quot;</span>,  <span class="stringliteral">&quot;Suspended&quot;</span>, <span class="stringliteral">&quot;Suspended&quot;</span>};</div>
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno">  370</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *m_avrc_playback_state_str[5] = {<span class="stringliteral">&quot;stopped&quot;</span>, <span class="stringliteral">&quot;playing&quot;</span>, <span class="stringliteral">&quot;paused&quot;</span>,</div>
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno">  371</span>                                              <span class="stringliteral">&quot;forward seek&quot;</span>, <span class="stringliteral">&quot;reverse seek&quot;</span>};</div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno">  372</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *m_esp_bt_gap_discovery_state_t[2] = {<span class="stringliteral">&quot;Stopped&quot;</span>, <span class="stringliteral">&quot;Started&quot;</span>};</div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno">  373</span>  <a class="code hl_enumeration" href="group__a2dp.html#ga49adfa87b1ad7420b0075a0ac03cc194">esp_a2d_audio_state_t</a> audio_state = <a class="code hl_enumvalue" href="group__a2dp.html#gga49adfa87b1ad7420b0075a0ac03cc194a2cac45c7b95065ed02420c5a632ab538">ESP_A2D_AUDIO_STATE_STOPPED</a>;</div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno">  374</span>  <a class="code hl_enumeration" href="group__a2dp.html#ga52caa2d1e1c9d880c9651d52ff78a590">esp_a2d_connection_state_t</a> connection_state =</div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno">  375</span>      <a class="code hl_enumvalue" href="group__a2dp.html#gga52caa2d1e1c9d880c9651d52ff78a590ab87fa9d0f4c2fa39a931532f0e02e410">ESP_A2D_CONNECTION_STATE_DISCONNECTED</a>;</div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno">  376</span>  UBaseType_t task_priority = configMAX_PRIORITIES - 10;</div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno">  377</span>  <span class="comment">// volume</span></div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno">  378</span>  uint8_t volume_value = 0;</div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno">  379</span>  <span class="keywordtype">bool</span> is_volume_used = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno">  380</span>  <span class="keywordtype">bool</span> is_bluedroid_initialized = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno">  381</span>  BaseType_t task_core = 1;</div>
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno">  382</span> </div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno">  383</span>  <span class="keywordtype">int</span> event_queue_size = 20;</div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno">  384</span>  <span class="keywordtype">int</span> event_stack_size = 3072;</div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno">  385</span>  <a class="code hl_enumeration" href="group__a2dp.html#ga9861ef3ac455a4b2875219d457073de4">esp_bt_mode_t</a> bt_mode = <a class="code hl_enumvalue" href="group__a2dp.html#gga9861ef3ac455a4b2875219d457073de4a9fab3664192991a2bd656ba090c1da85">ESP_BT_MODE_CLASSIC_BT</a>;</div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno">  386</span>  std::vector&lt;esp_avrc_rn_event_ids_t&gt; avrc_rn_events = {</div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno">  387</span>      ESP_AVRC_RN_VOLUME_CHANGE};</div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno">  388</span> </div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno">  389</span>  QueueHandle_t app_task_queue = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno">  390</span>  TaskHandle_t app_task_handle = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno">  391</span> </div>
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno">  392</span><span class="preprocessor">#if ESP_IDF_VERSION &gt;= ESP_IDF_VERSION_VAL(5, 2, 1)</span></div>
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno">  393</span>  esp_bluedroid_config_t bluedroid_config{.ssp_en = <span class="keyword">true</span>};</div>
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno">  394</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno">  395</span> </div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno">  396</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> init_nvs();</div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno">  397</span>  <span class="keyword">virtual</span> esp_err_t esp_a2d_connect(<a class="code hl_typedef" href="group__a2dp.html#gae1f72542f04666cd97c26732366bf109">esp_bd_addr_t</a> peer) = 0;</div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno">  398</span>  <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *last_bda_nvs_name() = 0;</div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno">  399</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> get_last_connection();</div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno">  400</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> set_last_connection(<a class="code hl_typedef" href="group__a2dp.html#gae1f72542f04666cd97c26732366bf109">esp_bd_addr_t</a> bda);</div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno">  401</span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> has_last_connection();</div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno">  402</span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> read_address(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code hl_typedef" href="group__a2dp.html#gae1f72542f04666cd97c26732366bf109">esp_bd_addr_t</a> &amp;bda);</div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno">  403</span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> write_address(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code hl_typedef" href="group__a2dp.html#gae1f72542f04666cd97c26732366bf109">esp_bd_addr_t</a> bda);</div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno">  404</span> </div>
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno">  405</span>  <span class="comment">// change the scan mode</span></div>
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno">  406</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#af1e2f14ddbe9266b61f5e721095c3685">set_scan_mode_connectable</a>(<span class="keywordtype">bool</span> connectable);</div>
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno">  407</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> set_scan_mode_connectable_default() = 0;</div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno">  408</span> </div>
<div class="foldopen" id="foldopen00410" data-start="{" data-end="}">
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a8f1619be2457a0a9e359ff4fefe1dbf6">  410</a></span>  <span class="keyword">virtual</span> <a class="code hl_class" href="class_a2_d_p_volume_control.html">A2DPVolumeControl</a> *<a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a8f1619be2457a0a9e359ff4fefe1dbf6">volume_control</a>() {</div>
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno">  411</span>    <span class="keywordflow">return</span> volume_control_ptr != <span class="keyword">nullptr</span> ? volume_control_ptr</div>
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno">  412</span>                                         : &amp;default_volume_control;</div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno">  413</span>  }</div>
</div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno">  414</span> </div>
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno">  415</span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a8be3cf8679b236293658c06cd1ed010b">bt_start</a>();</div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno">  416</span>  <span class="keyword">virtual</span> esp_err_t bluedroid_init();</div>
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno">  417</span>  <span class="keyword">virtual</span> esp_err_t esp_a2d_disconnect(<a class="code hl_typedef" href="group__a2dp.html#gae1f72542f04666cd97c26732366bf109">esp_bd_addr_t</a> remote_bda) = 0;</div>
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno">  418</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> app_task_start_up();</div>
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno">  419</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> app_task_shut_down();</div>
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno">  420</span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> app_send_msg(<a class="code hl_struct" href="structbt__app__msg__t.html">bt_app_msg_t</a> *msg);</div>
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno">  421</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> app_task_handler(<span class="keywordtype">void</span> *arg);</div>
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno">  422</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> app_work_dispatched(<a class="code hl_struct" href="structbt__app__msg__t.html">bt_app_msg_t</a> *msg);</div>
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno">  423</span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isSource() = 0;</div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno">  424</span>  <span class="comment">// GAP callback</span></div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno">  425</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> app_gap_callback(esp_bt_gap_cb_event_t event,</div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno">  426</span>                                esp_bt_gap_cb_param_t *param) = 0;</div>
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#ac5b64dc4ea62522eee0694454a393b2d">  428</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#ac5b64dc4ea62522eee0694454a393b2d">app_rc_ct_callback</a>(esp_avrc_ct_cb_event_t event,</div>
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno">  429</span>                                  esp_avrc_ct_cb_param_t *param) = 0;</div>
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"><a class="line" href="class_bluetooth_a2_d_p_common.html#a6aaac4480b57cbdbef5e07ca619eb330">  431</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_bluetooth_a2_d_p_common.html#a6aaac4480b57cbdbef5e07ca619eb330">app_a2d_callback</a>(esp_a2d_cb_event_t event,</div>
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno">  432</span>                                esp_a2d_cb_param_t *param) = 0;</div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno">  433</span>  <span class="comment">// handler for bluetooth stack enabled events</span></div>
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno">  434</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> av_hdl_stack_evt(uint16_t event, <span class="keywordtype">void</span> *p_param) = 0;</div>
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno">  435</span> </div>
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno">  436</span><span class="preprocessor">#if ESP_IDF_VERSION &gt;= ESP_IDF_VERSION_VAL(4, 0, 0)</span></div>
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno">  437</span>  <a class="code hl_enumeration" href="group__a2dp.html#ga6562796046744d7333ad2c64d2c8557d">esp_bt_discovery_mode_t</a> discoverability = <a class="code hl_enumvalue" href="group__a2dp.html#gga6562796046744d7333ad2c64d2c8557da4fa5e4d5a80a86974515a8a362989711">ESP_BT_GENERAL_DISCOVERABLE</a>;</div>
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno">  438</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> app_rc_tg_callback(esp_avrc_tg_cb_event_t event,</div>
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno">  439</span>                                  esp_avrc_tg_cb_param_t *param) = 0;</div>
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno">  440</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> av_hdl_avrc_tg_evt(uint16_t event, <span class="keywordtype">void</span> *p_param) = 0;</div>
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno">  441</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno">  442</span> </div>
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno">  443</span>};</div>
</div>
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno">  444</span> </div>
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno">  445</span><span class="keyword">extern</span> <a class="code hl_class" href="class_bluetooth_a2_d_p_common.html">BluetoothA2DPCommon</a> *actual_bluetooth_a2dp_common;</div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno">  446</span> </div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno">  447</span><span class="preprocessor">#endif </span><span class="comment">// platform</span></div>
<div class="ttc" id="a_bluetooth_a2_d_p_common_8h_html_a9bee258e477be3c0e70d6029ed86a019"><div class="ttname"><a href="_bluetooth_a2_d_p_common_8h.html#a9bee258e477be3c0e70d6029ed86a019">app_callback_t</a></div><div class="ttdeci">void(* app_callback_t)(uint16_t event, void *param)</div><div class="ttdoc">handler for the dispatched work</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:124</div></div>
<div class="ttc" id="aclass_a2_d_p_default_volume_control_html"><div class="ttname"><a href="class_a2_d_p_default_volume_control.html">A2DPDefaultVolumeControl</a></div><div class="ttdoc">Default implementation for handling of the volume of the audio data.</div><div class="ttdef"><b>Definition</b> A2DPVolumeControl.h:151</div></div>
<div class="ttc" id="aclass_a2_d_p_volume_control_html"><div class="ttname"><a href="class_a2_d_p_volume_control.html">A2DPVolumeControl</a></div><div class="ttdoc">Abstract class for handling of the volume of the audio data.</div><div class="ttdef"><b>Definition</b> A2DPVolumeControl.h:54</div></div>
<div class="ttc" id="aclass_a2_d_p_volume_control_html_a4a40e553f8c15a2cecb6f2f71fa0464c"><div class="ttname"><a href="class_a2_d_p_volume_control.html#a4a40e553f8c15a2cecb6f2f71fa0464c">A2DPVolumeControl::set_volume</a></div><div class="ttdeci">virtual void set_volume(uint8_t volume)=0</div><div class="ttdoc">Sets the volume level (pure virtual function)</div></div>
<div class="ttc" id="aclass_a2_d_p_volume_control_html_abdb9256f6a30b6c716193af7fadeee9c"><div class="ttname"><a href="class_a2_d_p_volume_control.html#abdb9256f6a30b6c716193af7fadeee9c">A2DPVolumeControl::set_enabled</a></div><div class="ttdeci">void set_enabled(bool enabled)</div><div class="ttdoc">Enables or disables volume control.</div><div class="ttdef"><b>Definition</b> A2DPVolumeControl.h:112</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html">BluetoothA2DPCommon</a></div><div class="ttdoc">Common Bluetooth A2DP functions.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:173</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a04bc52a4279a503203084492fe20c32e"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a04bc52a4279a503203084492fe20c32e">BluetoothA2DPCommon::set_event_stack_size</a></div><div class="ttdeci">void set_event_stack_size(int size)</div><div class="ttdoc">Defines the stack size of the event task (in bytes)</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:297</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a0a8a860a325348cdf210637e8d1159e6"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a0a8a860a325348cdf210637e8d1159e6">BluetoothA2DPCommon::set_connected</a></div><div class="ttdeci">virtual void set_connected(bool active)</div><div class="ttdoc">Calls disconnect or reconnect.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:110</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a0bab92d9317837ecaeacbfe26814e28c"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a0bab92d9317837ecaeacbfe26814e28c">BluetoothA2DPCommon::set_volume</a></div><div class="ttdeci">virtual void set_volume(uint8_t volume)</div><div class="ttdoc">Sets the volume (range 0 - 127)</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:223</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a0e570c2c2f9db40873286e0571f0d93a"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a0e570c2c2f9db40873286e0571f0d93a">BluetoothA2DPCommon::get_volume</a></div><div class="ttdeci">virtual int get_volume()</div><div class="ttdoc">Determines the actual volume.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:232</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a145c20271b53d4329e0e2c7fa36692b0"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a145c20271b53d4329e0e2c7fa36692b0">BluetoothA2DPCommon::set_bluedroid_config_t</a></div><div class="ttdeci">void set_bluedroid_config_t(esp_bluedroid_config_t cfg)</div><div class="ttdoc">Defines the esp_bluedroid_config_t: Available from IDF 5.2.1.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:324</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a169e9b94cbbfb7311a8722cc6d436e95"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a169e9b94cbbfb7311a8722cc6d436e95">BluetoothA2DPCommon::set_on_audio_state_changed_post</a></div><div class="ttdeci">virtual void set_on_audio_state_changed_post(void(*callBack)(esp_a2d_audio_state_t state, void *), void *obj=nullptr)</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:351</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a17013c6f40042c68821548cab9ddb5eb"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a17013c6f40042c68821548cab9ddb5eb">BluetoothA2DPCommon::set_avrc_rn_events</a></div><div class="ttdeci">virtual void set_avrc_rn_events(std::vector&lt; esp_avrc_rn_event_ids_t &gt; events)</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:341</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a2302fff324e703c3906835f759e87307"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a2302fff324e703c3906835f759e87307">BluetoothA2DPCommon::delay_ms</a></div><div class="ttdeci">void delay_ms(uint32_t millis)</div><div class="ttdoc">calls vTaskDelay to pause for the indicated number of milliseconds</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:586</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a2b78346084e12feeea035d006e7cf07a"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a2b78346084e12feeea035d006e7cf07a">BluetoothA2DPCommon::to_str</a></div><div class="ttdeci">const char * to_str(esp_a2d_connection_state_t state)</div><div class="ttdoc">converts esp_a2d_connection_state_t to a string</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:373</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a41ab8453d4f7f88d68d6cdb1a866532b"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a41ab8453d4f7f88d68d6cdb1a866532b">BluetoothA2DPCommon::set_default_bt_mode</a></div><div class="ttdeci">virtual void set_default_bt_mode(esp_bt_mode_t mode)</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:320</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a458bca4d65937c5e2de7bfeb0f454d88"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a458bca4d65937c5e2de7bfeb0f454d88">BluetoothA2DPCommon::get_name</a></div><div class="ttdeci">virtual const char * get_name()</div><div class="ttdoc">Provides the actual SSID name.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:313</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a4bbbd1a2c9c85004afaa7c6dbad45322"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a4bbbd1a2c9c85004afaa7c6dbad45322">BluetoothA2DPCommon::~BluetoothA2DPCommon</a></div><div class="ttdeci">virtual ~BluetoothA2DPCommon()=default</div><div class="ttdoc">Destructor.</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a513b32676d8fc248bb481180f832ef97"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a513b32676d8fc248bb481180f832ef97">BluetoothA2DPCommon::get_connection_state</a></div><div class="ttdeci">virtual esp_a2d_connection_state_t get_connection_state()</div><div class="ttdoc">Determine the connection state.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:76</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a537d576b12d1158eb0681a6195b258de"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a537d576b12d1158eb0681a6195b258de">BluetoothA2DPCommon::set_auto_reconnect</a></div><div class="ttdeci">void set_auto_reconnect(bool active)</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:82</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a5e76412770515732e3f54275decf02f0"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a5e76412770515732e3f54275decf02f0">BluetoothA2DPCommon::is_connected</a></div><div class="ttdeci">virtual bool is_connected()</div><div class="ttdoc">Checks if A2DP is connected.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:218</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a5f13ecf541393c21a5a489235bad27fb"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a5f13ecf541393c21a5a489235bad27fb">BluetoothA2DPCommon::set_on_audio_state_changed</a></div><div class="ttdeci">virtual void set_on_audio_state_changed(void(*callBack)(esp_a2d_audio_state_t state, void *), void *obj=nullptr)</div><div class="ttdoc">Set the callback that is called when the audio state is changed.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:343</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a688bfd727bfed94f255b63c16a6b1b3c"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a688bfd727bfed94f255b63c16a6b1b3c">BluetoothA2DPCommon::get_millis</a></div><div class="ttdeci">unsigned long get_millis()</div><div class="ttdoc">Provides the time in milliseconds since the last system boot.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:595</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a68f9e168839f0faeb72705ccabbb6b7a"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a68f9e168839f0faeb72705ccabbb6b7a">BluetoothA2DPCommon::set_task_priority</a></div><div class="ttdeci">void set_task_priority(UBaseType_t priority)</div><div class="ttdoc">defines the task priority (the default value is configMAX_PRIORITIES - 10)</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:287</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a694940fad2a2d498875cfbdf52eea58b"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a694940fad2a2d498875cfbdf52eea58b">BluetoothA2DPCommon::set_task_core</a></div><div class="ttdeci">void set_task_core(BaseType_t core)</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:291</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a6aaac4480b57cbdbef5e07ca619eb330"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a6aaac4480b57cbdbef5e07ca619eb330">BluetoothA2DPCommon::app_a2d_callback</a></div><div class="ttdeci">virtual void app_a2d_callback(esp_a2d_cb_event_t event, esp_a2d_cb_param_t *param)=0</div><div class="ttdoc">callback function for A2DP source</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a6c7e4fb41d19a7d79bce115bd1502649"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a6c7e4fb41d19a7d79bce115bd1502649">BluetoothA2DPCommon::ccall_bt_app_task_handler</a></div><div class="ttdeci">friend void ccall_bt_app_task_handler(void *arg)</div><div class="ttdoc">task handler</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:23</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a74eadbd69b5c7adf1b190c7e41b75b10"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a74eadbd69b5c7adf1b190c7e41b75b10">BluetoothA2DPCommon::get_audio_state</a></div><div class="ttdeci">virtual esp_a2d_audio_state_t get_audio_state()</div><div class="ttdoc">Determine the actual audio state.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:72</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a76e329bf0587ebf41792871acc69188b"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a76e329bf0587ebf41792871acc69188b">BluetoothA2DPCommon::end</a></div><div class="ttdeci">virtual void end(bool releaseMemory=false)</div><div class="ttdoc">Closes the connection and stops A2DP.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:132</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a7757ddbf424aeb909dc952d7c40fc241"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a7757ddbf424aeb909dc952d7c40fc241">BluetoothA2DPCommon::set_volume_control</a></div><div class="ttdeci">virtual void set_volume_control(A2DPVolumeControl *ptr)</div><div class="ttdoc">you can define a custom VolumeControl implementation</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:235</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a788d81fe538021f912d737de72ed6be6"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a788d81fe538021f912d737de72ed6be6">BluetoothA2DPCommon::connect_to</a></div><div class="ttdeci">virtual bool connect_to(esp_bd_addr_t peer)</div><div class="ttdoc">Connnects to the indicated address.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:99</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a791432e5c800e75fb11b858071cff651"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a791432e5c800e75fb11b858071cff651">BluetoothA2DPCommon::log_free_heap</a></div><div class="ttdeci">void log_free_heap()</div><div class="ttdoc">Logs the free heap.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:368</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a7cbfe59ac018d6886622c24139742ebe"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a7cbfe59ac018d6886622c24139742ebe">BluetoothA2DPCommon::BluetoothA2DPCommon</a></div><div class="ttdeci">BluetoothA2DPCommon()</div><div class="ttdoc">Default constructor.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:68</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a8b37f48a6b0bca33fb21b2a9ae9dab7c"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a8b37f48a6b0bca33fb21b2a9ae9dab7c">BluetoothA2DPCommon::set_connectable</a></div><div class="ttdeci">virtual void set_connectable(bool connectable)</div><div class="ttdoc">Bluetooth connectable.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:308</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a8be3cf8679b236293658c06cd1ed010b"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a8be3cf8679b236293658c06cd1ed010b">BluetoothA2DPCommon::bt_start</a></div><div class="ttdeci">virtual bool bt_start()</div><div class="ttdoc">Startup logic as implemented by Arduino.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:401</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a8e53adc58f665113c9ac6a5521e58814"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a8e53adc58f665113c9ac6a5521e58814">BluetoothA2DPCommon::set_discoverability</a></div><div class="ttdeci">virtual void set_discoverability(esp_bt_discovery_mode_t d)</div><div class="ttdoc">Bluetooth discoverability.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:543</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a8f1619be2457a0a9e359ff4fefe1dbf6"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a8f1619be2457a0a9e359ff4fefe1dbf6">BluetoothA2DPCommon::volume_control</a></div><div class="ttdeci">virtual A2DPVolumeControl * volume_control()</div><div class="ttdoc">provides access to the VolumeControl object</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:410</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_a962cc9aef396b06c7eb6f56462a743ac"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#a962cc9aef396b06c7eb6f56462a743ac">BluetoothA2DPCommon::clean_last_connection</a></div><div class="ttdeci">virtual void clean_last_connection()</div><div class="ttdoc">clean last connection (delete)</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:284</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_aa6601d3c57e37f77bfdd03a3ef6231e2"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#aa6601d3c57e37f77bfdd03a3ef6231e2">BluetoothA2DPCommon::debounce</a></div><div class="ttdeci">virtual void debounce(void(*cb)(void), int ms)</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:359</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_aa79cff78c075c9273ea2b5c03f052fcd"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#aa79cff78c075c9273ea2b5c03f052fcd">BluetoothA2DPCommon::set_on_connection_state_changed</a></div><div class="ttdeci">virtual void set_on_connection_state_changed(void(*callBack)(esp_a2d_connection_state_t state, void *), void *obj=nullptr)</div><div class="ttdoc">Set the callback that is called when the connection state is changed.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:335</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_ab63e627832d6377be32dd700130bf0d8"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#ab63e627832d6377be32dd700130bf0d8">BluetoothA2DPCommon::disconnect</a></div><div class="ttdeci">virtual void disconnect()</div><div class="ttdoc">Closes the connection.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:119</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_ac5b64dc4ea62522eee0694454a393b2d"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#ac5b64dc4ea62522eee0694454a393b2d">BluetoothA2DPCommon::app_rc_ct_callback</a></div><div class="ttdeci">virtual void app_rc_ct_callback(esp_avrc_ct_cb_event_t event, esp_avrc_ct_cb_param_t *param)=0</div><div class="ttdoc">callback function for AVRCP controller</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_ac795a023f85438355a1b00644f2b040f"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#ac795a023f85438355a1b00644f2b040f">BluetoothA2DPCommon::reconnect</a></div><div class="ttdeci">virtual bool reconnect()</div><div class="ttdoc">Reconnects to the last device.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:87</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_ac82ed712dca89857181a7d1835cced7c"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#ac82ed712dca89857181a7d1835cced7c">BluetoothA2DPCommon::ccall_app_rc_tg_callback</a></div><div class="ttdeci">friend void ccall_app_rc_tg_callback(esp_avrc_tg_cb_event_t event, esp_avrc_tg_cb_param_t *param)</div><div class="ttdoc">handle esp_avrc_tg_cb_event_t</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:54</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_acf924bb9f5e348c85e65879c337a4bde"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#acf924bb9f5e348c85e65879c337a4bde">BluetoothA2DPCommon::get_last_peer_address</a></div><div class="ttdeci">virtual esp_bd_addr_t * get_last_peer_address()</div><div class="ttdoc">Provides the address of the last device.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:300</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_ae5e96c34428c50873a0ca7423a6b5402"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#ae5e96c34428c50873a0ca7423a6b5402">BluetoothA2DPCommon::set_event_queue_size</a></div><div class="ttdeci">void set_event_queue_size(int size)</div><div class="ttdoc">Defines the queue size of the event task.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:294</div></div>
<div class="ttc" id="aclass_bluetooth_a2_d_p_common_html_af1e2f14ddbe9266b61f5e721095c3685"><div class="ttname"><a href="class_bluetooth_a2_d_p_common.html#af1e2f14ddbe9266b61f5e721095c3685">BluetoothA2DPCommon::set_scan_mode_connectable</a></div><div class="ttdeci">virtual void set_scan_mode_connectable(bool connectable)</div><div class="ttdoc">Defines if the bluetooth is connectable.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.cpp:552</div></div>
<div class="ttc" id="agroup__a2dp_html_ga28a6ac1cbaf47c9d341da5391e2e72b3"><div class="ttname"><a href="group__a2dp.html#ga28a6ac1cbaf47c9d341da5391e2e72b3">ReconnectStatus</a></div><div class="ttdeci">ReconnectStatus</div><div class="ttdoc">Buetooth A2DP Reconnect Status.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:166</div></div>
<div class="ttc" id="agroup__a2dp_html_ga49adfa87b1ad7420b0075a0ac03cc194"><div class="ttname"><a href="group__a2dp.html#ga49adfa87b1ad7420b0075a0ac03cc194">esp_a2d_audio_state_t</a></div><div class="ttdeci">esp_a2d_audio_state_t</div><div class="ttdoc">Buetooth A2DP datapath states.</div><div class="ttdef"><b>Definition</b> external_lists.h:5</div></div>
<div class="ttc" id="agroup__a2dp_html_ga52caa2d1e1c9d880c9651d52ff78a590"><div class="ttname"><a href="group__a2dp.html#ga52caa2d1e1c9d880c9651d52ff78a590">esp_a2d_connection_state_t</a></div><div class="ttdeci">esp_a2d_connection_state_t</div><div class="ttdoc">Buetooth A2DP connection states.</div><div class="ttdef"><b>Definition</b> external_lists.h:16</div></div>
<div class="ttc" id="agroup__a2dp_html_ga6562796046744d7333ad2c64d2c8557d"><div class="ttname"><a href="group__a2dp.html#ga6562796046744d7333ad2c64d2c8557d">esp_bt_discovery_mode_t</a></div><div class="ttdeci">esp_bt_discovery_mode_t</div><div class="ttdoc">AVRCP discovery mode.</div><div class="ttdef"><b>Definition</b> external_lists.h:85</div></div>
<div class="ttc" id="agroup__a2dp_html_ga89fdf5fb26b1ea6f33d36cc0eebca4fb"><div class="ttname"><a href="group__a2dp.html#ga89fdf5fb26b1ea6f33d36cc0eebca4fb">esp_avrc_playback_stat_t</a></div><div class="ttdeci">esp_avrc_playback_stat_t</div><div class="ttdoc">AVRCP current status of playback.</div><div class="ttdef"><b>Definition</b> external_lists.h:72</div></div>
<div class="ttc" id="agroup__a2dp_html_ga9861ef3ac455a4b2875219d457073de4"><div class="ttname"><a href="group__a2dp.html#ga9861ef3ac455a4b2875219d457073de4">esp_bt_mode_t</a></div><div class="ttdeci">esp_bt_mode_t</div><div class="ttdoc">Bluetooth Controller mode.</div><div class="ttdef"><b>Definition</b> external_lists.h:96</div></div>
<div class="ttc" id="agroup__a2dp_html_gae1f72542f04666cd97c26732366bf109"><div class="ttname"><a href="group__a2dp.html#gae1f72542f04666cd97c26732366bf109">esp_bd_addr_t</a></div><div class="ttdeci">uint8_t esp_bd_addr_t[ESP_BD_ADDR_LEN]</div><div class="ttdoc">Bluetooth address.</div><div class="ttdef"><b>Definition</b> external_lists.h:107</div></div>
<div class="ttc" id="agroup__a2dp_html_gga49adfa87b1ad7420b0075a0ac03cc194a2cac45c7b95065ed02420c5a632ab538"><div class="ttname"><a href="group__a2dp.html#gga49adfa87b1ad7420b0075a0ac03cc194a2cac45c7b95065ed02420c5a632ab538">ESP_A2D_AUDIO_STATE_STOPPED</a></div><div class="ttdeci">@ ESP_A2D_AUDIO_STATE_STOPPED</div><div class="ttdef"><b>Definition</b> external_lists.h:8</div></div>
<div class="ttc" id="agroup__a2dp_html_gga52caa2d1e1c9d880c9651d52ff78a590a0248c5f6ba7c85f2044a9a2c79bc57d4"><div class="ttname"><a href="group__a2dp.html#gga52caa2d1e1c9d880c9651d52ff78a590a0248c5f6ba7c85f2044a9a2c79bc57d4">ESP_A2D_CONNECTION_STATE_CONNECTED</a></div><div class="ttdeci">@ ESP_A2D_CONNECTION_STATE_CONNECTED</div><div class="ttdef"><b>Definition</b> external_lists.h:19</div></div>
<div class="ttc" id="agroup__a2dp_html_gga52caa2d1e1c9d880c9651d52ff78a590ab87fa9d0f4c2fa39a931532f0e02e410"><div class="ttname"><a href="group__a2dp.html#gga52caa2d1e1c9d880c9651d52ff78a590ab87fa9d0f4c2fa39a931532f0e02e410">ESP_A2D_CONNECTION_STATE_DISCONNECTED</a></div><div class="ttdeci">@ ESP_A2D_CONNECTION_STATE_DISCONNECTED</div><div class="ttdef"><b>Definition</b> external_lists.h:17</div></div>
<div class="ttc" id="agroup__a2dp_html_gga6562796046744d7333ad2c64d2c8557da4fa5e4d5a80a86974515a8a362989711"><div class="ttname"><a href="group__a2dp.html#gga6562796046744d7333ad2c64d2c8557da4fa5e4d5a80a86974515a8a362989711">ESP_BT_GENERAL_DISCOVERABLE</a></div><div class="ttdeci">@ ESP_BT_GENERAL_DISCOVERABLE</div><div class="ttdef"><b>Definition</b> external_lists.h:88</div></div>
<div class="ttc" id="agroup__a2dp_html_gga9861ef3ac455a4b2875219d457073de4a9fab3664192991a2bd656ba090c1da85"><div class="ttname"><a href="group__a2dp.html#gga9861ef3ac455a4b2875219d457073de4a9fab3664192991a2bd656ba090c1da85">ESP_BT_MODE_CLASSIC_BT</a></div><div class="ttdeci">@ ESP_BT_MODE_CLASSIC_BT</div><div class="ttdef"><b>Definition</b> external_lists.h:99</div></div>
<div class="ttc" id="astructbt__app__msg__t_html"><div class="ttname"><a href="structbt__app__msg__t.html">bt_app_msg_t</a></div><div class="ttdoc">Internal message to be sent for BluetoothA2DPSink and BluetoothA2DPSource.</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:128</div></div>
<div class="ttc" id="astructbt__app__msg__t_html_a3d8f18211a5ce29fecbebc5546e7a17e"><div class="ttname"><a href="structbt__app__msg__t.html#a3d8f18211a5ce29fecbebc5546e7a17e">bt_app_msg_t::sig</a></div><div class="ttdeci">uint16_t sig</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:129</div></div>
<div class="ttc" id="astructbt__app__msg__t_html_a64ce3190ec86ce6a75f6b421319ed8f7"><div class="ttname"><a href="structbt__app__msg__t.html#a64ce3190ec86ce6a75f6b421319ed8f7">bt_app_msg_t::cb</a></div><div class="ttdeci">app_callback_t cb</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:131</div></div>
<div class="ttc" id="astructbt__app__msg__t_html_a74f4561abb15d9ae98c3eefdd68de7c4"><div class="ttname"><a href="structbt__app__msg__t.html#a74f4561abb15d9ae98c3eefdd68de7c4">bt_app_msg_t::event</a></div><div class="ttdeci">uint16_t event</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:130</div></div>
<div class="ttc" id="astructbt__app__msg__t_html_aae06d9a8a215b9ae4b5a3827f5e5e7a7"><div class="ttname"><a href="structbt__app__msg__t.html#aae06d9a8a215b9ae4b5a3827f5e5e7a7">bt_app_msg_t::param</a></div><div class="ttdeci">void * param</div><div class="ttdef"><b>Definition</b> BluetoothA2DPCommon.h:132</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
